#pragma once

#include <d3dx9math.h>

class Vector3 : public D3DXVECTOR3
{
public:
	Vector3( void );
	Vector3( float fx, float fy, float fz );
	Vector3( const D3DXVECTOR3 & vector );

	~Vector3( void );

public:
	void Set( float fx, float fy, float fz );

	void Normalize()	{ D3DXVec3Normalize(this, this); }

	float GetLength() { return D3DXVec3Length( this ); }
	float GetLengthSquared() { return D3DXVec3LengthSq( this ); }

	float GetDotProduct( const Vector3 & other ) { return D3DXVec3Dot( this, &other ); }
	Vector3 GetCrossProduct( const Vector3 & other );
	Vector3 Lerp( const Vector3 & other, const float ratio ); 

	float GetDistanse( const Vector3 & other );

	bool operator == ( const D3DXVECTOR3 & other )
	{
		return ( *((D3DXVECTOR3*)this) == other ) ? true : false;
	}
};
